package director;

import creational.abstract_factory.AbstractFactory;
import creational.abstract_factory.impl.ShanghaiFactory;

public class AbstractFactoryDirector {

    public static void main(String[] args) {
        //首先在上海建立一个工厂，规划了A级车和B级车两条生产线
        AbstractFactory factory = new ShanghaiFactory();
        //生产A级车，生产出Polo车型
        factory.createFamilyA().create();
        System.out.println("===============================");
        //生产B级车，生产出Passat车型
        factory.createFamilyB().create();
    }
}
